package com.ucode.application.vo.acis;

import com.ucode.acis.mode.FamousExpert;
import com.ucode.acis.mode.Works;
import com.ucode.oss.model.FileInfo;

@SuppressWarnings("serial")
public class WorksVo extends com.ucode.acis.vo.WorksVo {

    private String coverUrl;
    
    private String coverName;
    
    public WorksVo(Works works,FamousExpert famousExpert,FileInfo coverFile){
        super();
        if(works != null){
            this.setId(works.getId());
            this.setCreatedTime(works.getCreatedTime());
            this.setUpdatedTime(works.getUpdatedTime());
            this.setDeltag(works.getDeltag());
            this.setName(works.getName());
            this.setEra(works.getEra());
            this.setGenreType(works.getGenreType());
            this.setBookStyle(works.getBookStyle());
            this.setFamousId(works.getFamousId());
            this.setCoverId(works.getCoverId());
            this.setSummary(works.getSummary());
            this.setIntro(works.getIntro());
            this.setSort(works.getSort());
        }
        
        if(famousExpert != null){
            this.setFamousName(famousExpert.getName());
        }
        
        if(coverFile != null){
            this.setCoverUrl(coverFile.getUrlprefix()+coverFile.getFilePath());
            this.setCoverName(coverFile.getSourceName());
        }
        
    }

    public String getCoverUrl() {
        return coverUrl;
    }

    public void setCoverUrl(String coverUrl) {
        this.coverUrl = coverUrl;
    }

    public String getCoverName() {
        return coverName;
    }

    public void setCoverName(String coverName) {
        this.coverName = coverName;
    }
    
    
    
}
